Skip to content

feat(install): one-command curl installer for binary + Claude Code plugin - #7

Merged
fasdwcx merged 1 commit into
mainfrom
feat/install-script
Jul 28, 2026
Merged

feat(install): one-command curl installer for binary + Claude Code plugin#7
fasdwcx merged 1 commit into
mainfrom
feat/install-script

Conversation

@fasdwcx

@fasdwcx fasdwcx commented Jul 28, 2026

Copy link
Copy Markdown

Closes #6

Summary

One-command install/upgrade for macOS/Linux (amd64/arm64):

curl -fsSL https://raw.githubusercontent.com/relytcloud/engram/main/install.sh | bash
  • Auto-discovers the latest release (releases/latest redirect; GitHub API + optional GH_TOKEN fallback) — no hardcoded version
  • Verifies sha256 (portable awk compare; --no-verify escape hatch), installs to ~/.local/bin (--dir), macOS quarantine strip
  • Wires the Claude Code plugin: runs engram setup claude-code with curl|bash-safe stdin handling (tty inherit / /dev/tty borrow / /dev/null with an explanatory note — never lets a child eat script bytes), detects a foreign 'engram' marketplace and offers remediation (--replace-marketplace), then refreshes plugin assets (marketplace update + plugin update) since plugin install is a no-op on upgrades
  • Idempotent: same version → skip download; upgrade = re-run the same command (binary + plugin assets both)
  • Flags: --version --dir --no-plugin --force --no-verify --protocol --replace-marketplace --yes --dry-run + env mirrors; unknown flags fail loudly
  • Docs: README quick-install first (manual snippet now derives VER from the redirect so it can't rot), INSTALL.zh-CN.md 「零、一键安装」, INSTALLATION.md de-upstreamed (Homebrew removed, go-install warning — module path still points upstream), RELEASING.md, CLAUDE.md
  • CI: new install-script job (ubuntu+macos): bash -n, shellcheck, dry-run, fresh install, 0.3.0→latest upgrade + idempotent re-run, true-pipe test, failure-mode exit codes
  • GoReleaser: releases now attach a tag-pinned install.sh

Verification (sandbox, all real output)

  • bash -n + shellcheck -S style: clean
  • --dry-run: resolved 0.4.0 / linux_amd64 / correct asset URL
  • fresh install → engram 0.4.0; true pipe (cat install.sh | bash -s --) → no hang, works
  • upgrade chain: pin 0.3.0 → bare re-run upgrades to 0.4.0 → third run prints already-installed
  • checksum-mismatch → exit 1 with clear message; offline (dead proxy) → exit 1 with --version workaround hint
  • unknown flag / nonexistent version → exit 1

🤖 Generated with Claude Code

…plugin

Auto-discovers the latest release (redirect + API fallback), verifies
sha256, installs to ~/.local/bin, wires the Claude Code plugin with
curl|bash-safe stdin handling, and refreshes plugin assets on upgrade.
Docs updated across README / INSTALL.zh-CN / INSTALLATION / RELEASING;
releases attach a tag-pinned copy.
@fasdwcx
fasdwcx merged commit 290c8fc into main Jul 28, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

One-command curl installer for binary + Claude Code plugin

1 participant